package remote

import "net"

type ProtocolType uint8

// Sraft Supported Protocol.
const (
	TCP = iota
	HTTP
)

type NodeType uint8

// communication entity of Master and Slave is different.
const (
	Master = iota
	Slave
)

// SlaveExchange is Abstraction of external communication entity. for Slave Node.
type SlaveExchange interface {
	// Send AppendEntriesResponse to Master.
	Send(interface{})
	// Recvice AppendEntries to local.
	Recv() interface{}
}

// MasterExchange is Abstraction of external communiaction entity. for Master Node.
type MasterExchange interface {
	NewConn() net.Conn
}
